1. Field of the Invention
The present invention relates to moving image coding method and apparatus for executing the compression coding of a moving image by suitably switching intra coding which utilizes spatial redundancy in a frame and inter coding which utilizes temporal redundancy between frames.
2. Description of the Related Art
FIG. 30 is a block diagram showing an example of the configuration of a conventional moving image apparatus (encoder). As shown in FIG. 30, a reference number 101 denotes an image input unit, 103 denotes a discrete cosine transform (DCT) unit for performing orthogonal transformation, 104 denotes a quantizer, 105 denotes a Huffman encoder for executing variable-length coding, 106 denotes a dequantizer, 107 denotes a inverse DCT unit for performing inverse orthogonal transformation, 108 denotes a reference image memory, 109 denotes a motion compensator, 110 denotes a motion detector and 3011 denotes a memory controller.
In the case intra coding is executed in the moving image coding apparatus configured as shown in FIG. 30, intra coding utilizing spatial redundancy in an image frame is executed by performing orthogonal transformation in the DCT unit 103 every macro block of a present image input from the image input unit 101, executing quantization in the quantizer 104 and executing variable-length coding in the Huffman encoder 105.
At this time, a reference image is generated by executing inverse quantization for data after quantization in the dequantizer 106 and performing inverse orthogonal transformation in the inverse DCT unit 107 and is stored in the reference image memory 108.
In the meantime, in the case of inter coding, a present image frame input from the image input unit 101 is compared with a reference image frame stored in the reference image memory 108 in the motion detector 110 and a motion vector is acquired every macro block or every frame. Further, motion compensation using the motion vector is performed for the reference image frame in the motion compensator 109 and a predictive image frame is generated.
Next, inter coding utilizing temporal redundancy between image frames is executed by applying orthogonal transformation to difference between a present image frame and a predictive image frame every macro block in the DCT unit 103, quantizing the result in the quantizer 104 and coding the result in variable length in the Huffman encoder 105.
At this time, a reference image is generated by applying inverse quantization to data after quantization in the dequantizer 106, performing inverse orthogonal transformation in the inverse DCT unit 107 and further, adding to motion compensated predictive data output from the motion compensator 109 and is stored in the reference image memory 108.
As described above, macro blocks of the reference image are generated for all macro blocks in the present image frame for which intra coding and inter coding are performed and are stored in the reference image memory 108. A series of processing that generates a reference image based upon data after inverse quantization is called local decoding.
As described above, predictive coding using a reference image in the compression coding of a moving image is the base of the technique and as further complex predictive coding is used in moving image coding for television broadcasting, various trial for efficiently controlling a buffer memory which has been used for a reference image memory is made (for example, refer to JP-A-11-313327).
A related reference with respect to the application is JP-A-11-313327.
In moving image compression coding technique, to acquire as high image quality as possible in a range of bit rates of available transmission lines, the realization of high compressibility is required.
However, recently, the bit rates of transmission lines available in mobile equipment are greatly enhanced by the development of new communication technology, image compression technique such as MPEG-4 for application to such mobile equipment is also developed and the importance of a low-priced encoder that can be mounted in such mobile equipment increases because more natural moving image communication is enabled in a personal computer and mobile equipment.
In such a background, to reduce the cost of the encoder mounted in mobile equipment, it is considered that not only a buffer memory is efficiently used as in technique disclosed in the patent document 1 but the capacity of a reference image memory is reduced, which is directly related to the reduction of the cost.
It means limitation to predictive coding which is the base of the technique that the capacity of the reference image memory is reduced, as a result, the efficiency of coding is deteriorated and coding quantity is increased. However, in consideration of the bit rates of transmission lines available in recent mobile equipment and actually transmitted image size, it is possible to find practical balance.
In a moving image coding apparatus for a video screen, in the case a reference image memory corresponding to normal screen size is provided, a mass-storage reference image memory according to large screen size is further required to be provided to also enable the moving image coding of the large screen size (a large number of pixels) in the same apparatus and there is a problem that the system cost is increased.